﻿using System;

namespace GSE.Rpc
{
    /// <summary>
    /// 注册远端请求处理器. 远端可向本端发起请求,通过此方法来注册处理远端请求的处理逻辑.
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
    public sealed class RpcRegisterHandlerMethodAttribute : Attribute
    {
        readonly string requestName;
        public RpcRegisterHandlerMethodAttribute(string requestName = "")
        {
            this.requestName = requestName;
        }

        public string RequestName
        {
            get { return requestName; }
        }
    }
}
